<?php
session_start();

if (!isset($_SESSION['classes']))
{
	$_SESSION['classes'] = array(
		"1" => array("class" => "Form 1 Class A"),
		"2" => array("class" => "Form 1 Class B"),
	);
}
$classes = &$_SESSION['classes'];

$output = array();
foreach ($classes as $id => $row)
{
	$output[] = array( "id" => $id, "class" => $row["class"] );
}
echo json_encode($output);
?>